class ObjectValueThread extends Thread {
    private ObjectValueService service;
    public ObjectValueThread(ObjectValueService s){
        super();
        this.service = s;
    }
    @Override
    public void run() {
        service.testMethod();
    }
}
public class RunObjectValue {
    public static void main(String[] args) throws InterruptedException{
        ObjectValueService object = new ObjectValueService();
        ObjectValueThread  a  = new ObjectValueThread(object);
        a.setName("A");
        ObjectValueThread  b  = new ObjectValueThread(object);
        b.setName("B");
        a.start();
        Thread.sleep(50);
        b.start();
    }
}
